<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ page session="true" %>

	<!-- 콘텐츠 영역 -->
    <div id="BodyWrap">
        <section>
            <h4 class="pag_title">쇼핑계좌</h4>
            <div id="ContentWrap4">
                <div class="item_buytitarea" title="쇼핑 계좌">쇼핑 계좌</div>
                <table width="100%" border="0" cellpadding="0" cellspacing="0" class="item_callist" summary="쿠폰 정보 내역">
                    <colgroup>
                    <col style="width:33%">
                    <col style="width:67%">
                    </colgroup>
                    <tr>
                        <th colspan="2">쿠폰 할인</th>
                    </tr>
                    <tr>
                        <th>쿠폰보유</th>
                        <td class="ta_l">${couponTotal}장</td>
                    </tr>
                    <tr>
                        <th>적립금</th>
                        <td class="ta_l">${pointInfo.SUMM}점</td>
                    </tr>
                </table>
                
                <c:choose>
				<c:when test="${ requestScope.couponList != null }">
                <ul class="coupon_list">
                	<c:forEach items="${requestScope.couponList}" var="coupon" varStatus="status">
	                	<li>
	                    	<div>
	                            <ol>
	                                <li>쿠폰번호 : <b>${coupon.CPNID}</b></li>
	                                <li>쿠폰명 : <b>[${coupon.CPNCLNM}] ${coupon.CPNNM}</b></li>
	                                <li>사용기간 : <b>${coupon.USESTDT}~${coupon.USEENDDT}</b></li>
	                                <c:choose>
									<c:when test="${ coupon.PURRSTC == 'Y' }">
										<c:when test="${ coupon.CPNDESC != '' && coupon.REMARK1 != '' }">
											<li> 이 쿠폰은 비타민 하우스 상품 중 ${coupon.PURRSTCPRC}원 이상 구매시에만 적용됩니다.</li>
										</c:when>
										<c:otherwise>
											<li> 이 쿠폰은 ${coupon.PURRSTCPRC}원 이상 구매시에만 적용됩니다.</li>
										</c:otherwise>
									</c:when>
									</c:choose>
	                            </ol>
	                            <p>
	                            <c:choose>
								<c:when test="${ coupon.DCCL == '1' }">
	                            <span>${coupon.DCRANGE}</span>%
	                            </c:when>
	                            <c:otherwise>
	                            <span>${coupon.DCRANGE}</span>원
	                            </c:otherwise>
								</c:choose> 
	                            	할인</p>
	                        </div>
	                    </li>
	                 </c:forEach>
                </ul>
                </c:when>
                <c:otherwise>
                <div class="noncoup">
                	현재 보유중인 쿠폰이 없습니다.
                </div>
                </c:otherwise>
				</c:choose>
            </div>
        </section>
        <!--// 콘텐츠 영역 -->
